BR
bug - poketibia

[Encerrado] (Bug) Passiva

Por BrunooMaciell, 11 de mai. de 2013 em Tópicos Sem Resposta

resolvido
script
5
852
BrunooMaciellB
11 de maio de 2013 às 16:18

Estou com um bug na passiva !!

 

BUG

46275134.png

SCRIPT

 

arr = {

{0, 0, 0, 0, 0},

{0, 1, 1, 1, 0},

{0, 1, 2, 1, 0},

{0, 1, 1, 1, 0},

{0, 0, 0, 0, 0}

}

local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish",

"Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"}

function onCastSpell(cid, var)

local min = getWildPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano...

local max = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

 

if isCreature(cid) then

local name = getCreatureName(cid)

if isInArray(mega, name) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20%

local uid = checkAreaUid(getThingPos(cid), arr, 1, 1)

for _,pid in pairs(uid) do

if isCreature(pid) then

if getCreatureTarget(pid) == cid then

local hp = getCreatureHealth(pid)

local drain = choose(min, max)

if hp-drain >= 1 then

doCreatureAddHealth(pid, -drain)

doCreatureAddHealth(cid, drain)

doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144)

doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32)

end

end

end

end

end

end

end

end

 

 

Rep++

KarlKalvinK
12 de maio de 2013 às 05:12

 

 

 

arr = {

{0, 0, 0, 0, 0},

{0, 1, 1, 1, 0},

{0, 1, 2, 1, 0},

{0, 1, 1, 1, 0},

{0, 0, 0, 0, 0}

}

local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish",

"Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"}

function onCastSpell(cid, var)

local min = getWildPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano...

local max = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

local name = getCreatureName(cid)

if isInArray(mega, name) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20%

local uid = checkAreaUid(getThingPos(cid), arr, 1, 1)

for _,pid in pairs(uid) do

if isCreature(pid) then

if getCreatureTarget(pid) == cid then

local hp = getCreatureHealth(pid)

local drain = choose(min, max)

if hp-drain >= 1 then

doCreatureAddHealth(pid, -drain)

doCreatureAddHealth(cid, drain)

doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144)

doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32)

end

end

end

end

end

end

end

end

 

 

 

Testa aê.

kttallanK
13 de maio de 2013 às 17:02

Tentai Ai

 

 

arr = {

{0, 0, 0, 0, 0},

{0, 1, 1, 1, 0},

{0, 1, 2, 1, 0},

{0, 1, 1, 1, 0},

{0, 0, 0, 0, 0}

}

local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish",

"Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"}

function onCastSpell(cid, var)

local min = getWildPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano...

local max = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

 

if isCreature(cid) then

local name = getCreatureName(cid)

if isInArray(mega, name) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20%

local uid = checkAreaUid(getThingPos(cid), arr, 1, 1)

for _,pid in pairs(uid) do

if isCreature(pid) then

if getCreatureTarget(pid) == cid then

local hp = getCreatureHealth(pid)

local drain = choose(min, max)

if hp-drain >= 1 then

doCreatureAddHealth(pid, -drain)

doCreatureAddHealth(cid, drain)

doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144)

doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32)

end

end

end

end

end

end

end

 

end

 

Editado Maio 13 por kttallan

3 meses depois...
vital900V
04 de agosto de 2013 às 18:34

Tópico movido para a seção de dúvidas e pedidos resolvidos.

Tópico movido para a seção de dúvidas e pedidos resolvidos.

4 anos depois...
StigalS
21 de abril de 2018 às 02:58
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.